import http from "../../utils/requestAI";
import type { addCompany, cityData, Company, CompanyList, CompanyParams } from "./type";

export const getCompanys=(params?:CompanyParams)=>{
  return  http.get<CompanyList>('/company/list',params);
}

export const delCompany=(id:number)=>{
    return  http.delete(`/company/delete/${id}`);
}


export const delCompanys=(ids:number[])=>{
    // console.log('删除222',ids);
    return  http.post(`/company/deleteAll/`,ids);
}


// 获取城市信息
export const getCity=()=>{
  return  http.get<cityData>('/company/getCity');
}


// 添加账号
export const addAccount=(data:addCompany)=>{
  return  http.post<Company>('/company/add',data);
}